<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function getParams(url){
        var obj={}
        var q=url.split("?")[1].split("&")
        for(var i=0;i<q.length;i++){
            var qq=q[i].split("=")
            obj[qq[0]]=qq[1]
        }
        return obj
    }
    let obj=getParams('https://nowcoder.com/online?id=1&salas=1000')
    console.log(obj)
</script>